//
//  ConsumeInfoCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/8/9.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit

class ConsumeInfoCell: BaseTableViewCell {
    
    @IBOutlet weak var leftTopLabel: UILabel!
    
    @IBOutlet weak var leftBottomLabel: UILabel!
    
    @IBOutlet weak var rightLabel: UILabel!
    
    var model : GoldBeanListModel?{
        
        didSet{
            
            if model == nil {
                return
            }
            
            leftTopLabel.text = model?.stagetext
            
            leftBottomLabel.text = model?.pl_addtime
            
            if model!.pl_beans == nil {
                
                rightLabel.text = ""

                return
            }
            
           
            
            if  let temp = Float(model!.pl_beans!) {
                
                if temp > 0 {
                    
                    rightLabel.text = "+" + model!.pl_beans!
                    
                } else {
                    
                    rightLabel.text = model?.pl_beans
                }
                
            }
            
            
        
        
        }
    
    
    }
    

    override func awakeFromNib() {
        super.awakeFromNib()
        leftBottomLabel.textColor = UIColor.dakGray()
        
        contentView.backgroundColor = UIColor.white
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
